<!-- news -->
<section class="one-section one-news-section wt pc-safeCol2 wap-safeCol2" data-title="news">
  <div class="pc-safeRow wap-safeRow">
    <p class="one-h1">News</p>
    <div class="one-news-swiper showA">
      <div class="swiper-wrapper">
        {% for tmp_article in section.settings.blog.articles limit: section.settings.post_limit %}
          <a
            {% if tmp_article.url contains 'https://' %}
              target="_blank" rel="nofollow"
            {% endif %}
            href="{{ tmp_article.url }}"
            class="swiper-slide one-news-swiper-item one-pc-flexCol one-wap-flexCol "
          >
            <picture class="one-news-img">
              <img class="cover" src="{{ tmp_article.image.src | img_url: "master" }}" loading="lazy">
            </picture>
            <div class="one-news-swiper-info one-title">
              <p class="one-sh2">{{ tmp_article.title | escape }}</p>
              <p class="one-b2 grey">{{- tmp_article.published_at | time_tag: format: 'date' -}}</p>
            </div>
          </a>
        {%- endfor -%}
      </div>
    </div>
    <div class="one-news-btn-div one-pc-flexRow one-wap-flexRow">
      <div class="one-news-pagebtn-list one-pc-flexRow one-wap-flexRow">
        <svg
          class="one-news-pagebtn left"
          xmlns="http://www.w3.org/2000/svg"
          width="46"
          height="46"
          viewBox="0 0 46 46"
          fill="none"
        >
          <rect width="46" height="46" rx="23" fill="#0060EF" />
          <path d="M26.0273 14.5263L17.5537 22.9999L26.0273 31.4736" stroke="#fff"
              stroke-width="2.42105" stroke-linecap="round" stroke-linejoin="round" />
        </svg>
        <svg
          class="one-news-pagebtn right"
          xmlns="http://www.w3.org/2000/svg"
          width="46"
          height="46"
          viewBox="0 0 46 46"
          fill="none"
        >
          <rect width="46" height="46" rx="23" fill="#0060EF" />
          <path d="M26.0273 14.5263L17.5537 22.9999L26.0273 31.4736" stroke="#fff"
              stroke-width="2.42105" stroke-linecap="round" stroke-linejoin="round" />
        </svg>
      </div>
    </div>
  </div>
</section>

{% schema %}
{
  "name": "news",
  "settings": [
    {
      "type": "text",
      "id": "title",
      "default": "News",
      "label": "Title"
    },
    {
      "type": "blog",
      "id": "blog",
      "label": "Blog"
    },
    {
      "type": "range",
      "id": "post_limit",
      "min": 1,
      "max": 10,
      "step": 1,
      "default": 3,
      "label": "post limit"
    }
  ]
}
{% endschema %}
